# -- simple Rakefile for adding new files to svn repo --#

desc "Wrapper for svn commands"

namespace :svn do
  
  desc "shows svn status"
  task :status do
    system('svn status')
  end

  desc "adding new files to svn"
  task :add do
    system(%q{svn add `svn status | awk '$1=="?" {print $2}'`})
  end

  desc "removing already deleted files from svn repo"
  task :delete do
    system(%q{svn remove `svn status | awk '$1=="!" {print $2}'`})
  end

  desc "commit"
  task :commit do
    system('svn commit')
  end

  desc "update code and migrate database"
  task :up do
    system('svn up')
    Rake::Task["db:migrate"].invoke
  end
  
end


